
select value from 
::fn_listextendedproperty(@ExtendedProperty, null,
 null, null, null, null, null)

if @@rowcount = 0 
	exec sp_addextendedproperty @ExtendedProperty, @ExtendedPropertyValue
else
	exec sp_updateextendedproperty @ExtendedProperty, @ExtendedPropertyValue
	